package cn.hbu.zlfw.test.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/testjson")
public class JsonController {
	
	@ResponseBody
	@RequestMapping(value="/totestjson")
	public Map<String, Object> tojson() {
//		User user=new User();
//		user.setUsername("admin");
//		user.setPassword("123");
		Map<String, Object> params=new HashMap<String, Object>();
		params.put("username", "admin");
		params.put("age", 12);
		System.out.println(params.toString());
		return params;
	}
	
}